class BD_Fists extends BlackDeathWeapon;

var float MomentumScale;//Scalar for how much momentum to put onto an enemy when attacked.
var name FistSocket;//name of the socket to track
	
	function CallAttack()
	{
		local vector Loc;
		local BlackDeathPawn BDP;
		Instigator.Mesh.GetSocketWorldLocationAndRotation(FistSocket, Loc);
		ForEach OverlappingActors(class'BlackDeathPawn', BDP, 10, Loc)
		{
			if (BDP != Instigator)//if we hit a pawn and its not one we already hit, or the weapon owner
			{
				doAttack(BDP, Loc);
			}
		}
	}
	
	simulated function doAttack(Pawn AttackedPawn, Vector HitLocation)//Do the actual hit to the thing
	{
		local vector X, Y, Z, Momentum;
		GetAxes(Instigator.rotation, X, Y, Z);
		Momentum = MomentumScale * X /*+ MomentumScale * Y + MomentumScale * Z*/;//Find the player's rotation in vector form and multiple it by the force of the attack
		if(currentfiremode == 0)
		{
			AttackedPawn.TakeDamage(WeaponDamage, Instigator.Controller, HitLocation, Momentum, class'DmgType_Crushed');
		}
		if(currentfiremode == 1)
		{
			AttackedPawn.TakeDamage(HeavyWeaponDamage, Instigator.Controller, HitLocation, Momentum, class'DmgType_Crushed');
		}
	}

	simulated function EndSwing()
	{
	}

	simulated function bool HasAnyAmmo()
	{
		return true;//Weapon always has ammo
	}

	function ConsumeAmmo( byte FireModeNum )
	{
	}
	
	function int AddAmmo(int Amount)
	{
	}
	
	simulated state WeaponFiring
	{
		simulated function RefireCheckTimer()
		{
			Super.RefireCheckTimer();

		}
	}

	simulated function CustomFire()
	{
		local BlackDeathPawn BDP;
		BDP = BlackDeathPawn(instigator);
		if(BDP != none)
		{
			BDP.PlayWeaponSwing();
		}
	}
	
	simulated function StartFire(Byte FireModeNum)
	{
		if(FireModeNum == 0)
		{
			SetLightAttackAnimBlend();
		}
		else
		{
			SetHeavyAttackAnimBlend();
		}
		`log(self@": start fire called");
		super.StartFire(FireModeNum);
	}
	
	simulated function SetLightAttackAnimBlend()
	{
	}
	
	simulated function SetHeavyAttackAnimBlend()
	{
	}
	

DefaultProperties
{
	
	WeaponDamage = 5; //How much damage the wepon does
	HeavyWeaponDamage = 10;//How much damage the heavy fire mode does
	
	WeaponRange = 55//The weapon's range. Used for AI and maybe ranged weapons.
	
	FiringStatesArray(0)=WeaponFiring
	FiringStatesArray(1)=WeaponFiring
	WeaponFireTypes(0)=EWFT_Custom
	WeaponFireTypes(1)=EWFT_Custom
	
	bWeaponEquipAnims=false;
	
	WeaponProjectiles(0)=none
	
	EquipTime=+0.33
	PutDownTime=+0.33
	
	FireInterval(0)=1.0
	FireInterval(1)=1.0
	
	Spread(0)=0.0
	Spread(1)=0.0

	MaxRefireLength = 2.0

	AIRating=1.0
	
	WeaponEquipAnim=WeaponEquip
	FireAnim = VM_Stab
	
	FistSocket = WeaponPoint
	
	WeaponType = 1
}